import Vue from 'vue'
import Router from 'vue-router'
import layout from '@/layout/index'
import home from '@/views/home/index'
import main from '@/views/main/index'
import user from '@/views/user/index'
import login from '@/views/login/index'
import show from '@/views/show/index'

// const router = createRouter({})
Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      name:'login',
      component: login,
      // redirect: '/login',

    },
    {
      path: '/layout',
      name:'layout',
      // redirect: '/home',
      component: layout,
      children:[
        {
          path: '/',
          name: 'home',
          component: home,
        },
        {
          path: '/main',
          name: 'main',
          component: main,
        },
        {
          path: '/user',
          name: 'user',
          component: user,
        },
        {
          path: '/show',
          name: show,
          component: show,
        }
      ]
    }
  ]
})

 